package com.AO.DAO;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * MaterialFoodTypes entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "material_food_types", catalog = "delicacy")
public class MaterialFoodTypes implements java.io.Serializable {

	// Fields

	private String materialFoodTypeId;
	private MaterialFoodTypes materialFoodTypes;
	private String materialFoodTypeName;
	private Integer materialFoodTypeLevel;
	private String img;
	private Set<MfoodMfoodTypesRelation> mfoodMfoodTypesRelations = new HashSet<MfoodMfoodTypesRelation>(
			0);
	private Set<MaterialFoodTypes> materialFoodTypeses = new HashSet<MaterialFoodTypes>(
			0);

	// Constructors

	/** default constructor */
	public MaterialFoodTypes() {
	}

	/** minimal constructor */
	public MaterialFoodTypes(String materialFoodTypeId,
			String materialFoodTypeName, Integer materialFoodTypeLevel) {
		this.materialFoodTypeId = materialFoodTypeId;
		this.materialFoodTypeName = materialFoodTypeName;
		this.materialFoodTypeLevel = materialFoodTypeLevel;
	}

	/** full constructor */
	public MaterialFoodTypes(String materialFoodTypeId,
			MaterialFoodTypes materialFoodTypes, String materialFoodTypeName,
			Integer materialFoodTypeLevel, String img,
			Set<MfoodMfoodTypesRelation> mfoodMfoodTypesRelations,
			Set<MaterialFoodTypes> materialFoodTypeses) {
		this.materialFoodTypeId = materialFoodTypeId;
		this.materialFoodTypes = materialFoodTypes;
		this.materialFoodTypeName = materialFoodTypeName;
		this.materialFoodTypeLevel = materialFoodTypeLevel;
		this.img = img;
		this.mfoodMfoodTypesRelations = mfoodMfoodTypesRelations;
		this.materialFoodTypeses = materialFoodTypeses;
	}

	// Property accessors
	@Id
	@Column(name = "material_food_type_id", unique = true, nullable = false, length = 50)
	public String getMaterialFoodTypeId() {
		return this.materialFoodTypeId;
	}

	public void setMaterialFoodTypeId(String materialFoodTypeId) {
		this.materialFoodTypeId = materialFoodTypeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Superior_directory")
	public MaterialFoodTypes getMaterialFoodTypes() {
		return this.materialFoodTypes;
	}

	public void setMaterialFoodTypes(MaterialFoodTypes materialFoodTypes) {
		this.materialFoodTypes = materialFoodTypes;
	}

	@Column(name = "material_food_type_name", nullable = false, length = 50)
	public String getMaterialFoodTypeName() {
		return this.materialFoodTypeName;
	}

	public void setMaterialFoodTypeName(String materialFoodTypeName) {
		this.materialFoodTypeName = materialFoodTypeName;
	}

	@Column(name = "material_food_type_level", nullable = false)
	public Integer getMaterialFoodTypeLevel() {
		return this.materialFoodTypeLevel;
	}

	public void setMaterialFoodTypeLevel(Integer materialFoodTypeLevel) {
		this.materialFoodTypeLevel = materialFoodTypeLevel;
	}

	@Column(name = "img")
	public String getImg() {
		return this.img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "materialFoodTypes")
	public Set<MfoodMfoodTypesRelation> getMfoodMfoodTypesRelations() {
		return this.mfoodMfoodTypesRelations;
	}

	public void setMfoodMfoodTypesRelations(
			Set<MfoodMfoodTypesRelation> mfoodMfoodTypesRelations) {
		this.mfoodMfoodTypesRelations = mfoodMfoodTypesRelations;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "materialFoodTypes")
	public Set<MaterialFoodTypes> getMaterialFoodTypeses() {
		return this.materialFoodTypeses;
	}

	public void setMaterialFoodTypeses(
			Set<MaterialFoodTypes> materialFoodTypeses) {
		this.materialFoodTypeses = materialFoodTypeses;
	}

}